package com.elinkway.infinitemovies.ui.activity;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;

import com.elinkway.infinitemovies.application.MoviesApplication;
import com.elinkway.infinitemovies.bigdata.BigDataApi;
import com.elinkway.infinitemovies.ui.fragment.SubscriptionContentFragment;
import com.le123.ysdq.R;

import java.util.HashMap;

/**
 * Created by zhaopeipei on 2016/9/5.
 */
public class SubscriptionActivity extends BaseActionBarActivity {

    public static final String TAG = "Subscriptionhome";

    private Fragment mFragment;

    private FragmentManager fManager;

    private String mAid;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_subscription);
        currentPageId = "Subscriptionhome_" + mAid;
        initActionBar();
        mTitleTv.setText(getResources().getString(R.string.subscription));
        fManager = getSupportFragmentManager();
        mFragment = new SubscriptionContentFragment();
        FragmentTransaction transaction = fManager.beginTransaction();
        transaction.add(R.id.fl_subscription, mFragment);
        transaction.commitAllowingStateLoss();
        HashMap<String, String> hashMap = new HashMap<>();
        hashMap.put(BigDataApi.REF, MoviesApplication.getInstance().getLastPageClassName());
        BigDataApi.bigDataPageShowReport("subscriptionlist", hashMap, this);
        MoviesApplication.getInstance().setLastPageClassName(TAG);
    }

    @Override
    public void dealWithUmeng() {
    }

    @Override
    public void dealWithVisitUmeng() {
    }

}
